home *** CD-ROM | disk | FTP | other *** search
/ PCNet 2004 October / PCNET_CD_2004_10_1.iso / shareware / SESDemo.exe / {app} / CGI / cgiwrap.php < prev    next >
Encoding:
PHP Script  |  2004-06-11  |  561 b   |  25 lines

  1. <?
  2. $cgiPath = "(scriptpath)";
  3. $scrName = $_SERVER['PHP_SELF'];
  4. $pref = @$HTTP_GET_VARS ['pref'];
  5. $query = $_SERVER['QUERY_STRING'];
  6.  
  7. function PrintSearchCode ($url)
  8. {
  9.     $file = fopen ($url, 'r');
  10.     while (!feof ($file))
  11.     {
  12.         echo (fread ($file, 1024));
  13.     }
  14.     fclose ($file);
  15. }
  16.  
  17. if (!is_string($pref) || !@include ($pref . "header.htm"))
  18.     @include ("header.htm");
  19.  
  20. if (is_string($query))
  21.     PrintSearchCode ($cgiPath . "?" . $query . "&wrap=" . $scrName);
  22.  
  23. if (!is_string($pref) || !@include ($pref . "footer.htm"))
  24.     @include ("footer.htm");
  25. ?>